const EventEmitter=require("events");
const util=require("util");

function Radio(){
    EventEmitter.call(this);
}

util.inherits(Radio,EventEmitter);// 借助 util.inherits 实现继承
Radio.prototype.play=function(){
    console.log("music radio" +"FM 106.7 opened");
    console.log("lalal");
    this.emit("play");
}

Radio.prototype.stop=function(){
    // console.log("关闭音乐台");
    this.emit("stop");
}
module.exports=Radio;